package com.gaogzhen.security.lock;

import lombok.extern.slf4j.Slf4j;
import org.openjdk.jol.info.ClassLayout;

@Slf4j(topic = "security.lock.TestBiased01")
public class TestBiased01 {
    public static void main(String[] args) throws InterruptedException {
        Person p = new Person();
//        System.out.println("hashcode: " + p.hashCode());
        log.debug(ClassLayout.parseInstance(p).toPrintable());

        synchronized (p) {
            log.debug(ClassLayout.parseInstance(p).toPrintable());
        }
        log.debug(ClassLayout.parseInstance(p).toPrintable());
    }

}
